﻿// 文件路径：AyuBookmark.Common/Interfaces/IBookmarkService.cs
using System.Collections.Generic;
using System.Threading.Tasks;
using AyuBookmark.Common.Models;

namespace AyuBookmark.Common.Interfaces
{
    /// <summary>
    /// 书签服务接口
    /// </summary>
    public interface IBookmarkService
    {
        /// <summary>
        /// 根据URL获取书签详情
        /// </summary>
        //Task<Bookmark> GetBookmarkByUrlAsync(string url);

        /// <summary>
        /// 根据URL获取书签详情
        /// </summary>
        Task<Bookmark> GetBookmarkByUrlAsync(string url);

        /// <summary>
        /// 添加书签
        /// </summary>
        Task<Bookmark> AddBookmarkAsync(Bookmark bookmark);

        /// <summary>
        /// 更新书签
        /// </summary>
        Task<Bookmark> UpdateBookmarkAsync(Bookmark bookmark);

        /// <summary>
        /// 删除书签
        /// </summary>
        Task<bool> DeleteBookmarkAsync(int id);

        /// <summary>
        /// 获取书签分页列表
        /// </summary>
        Task<PaginatedResult<Bookmark>> GetBookmarksAsync(
            int pageIndex = 1,
            int pageSize = 20,
            string searchTerm = null,
            int? categoryId = null);

        /// <summary>
        /// 获取书签详情
        /// </summary>
        Task<Bookmark> GetBookmarkDetailsAsync(int id);

        /// <summary>
        /// 批量导入书签
        /// </summary>
        Task<int> ImportBookmarksAsync(IEnumerable<Bookmark> bookmarks);

        /// <summary>
        /// 批量更新书签分类
        /// </summary>
        Task<int> UpdateBookmarksCategoryAsync(IEnumerable<int> bookmarkIds, int categoryId);

        /// <summary>
        /// 批量删除书签
        /// </summary>
        Task<int> DeleteBookmarksAsync(IEnumerable<int> bookmarkIds);
    }
}